<template>
  <div class="followRecord">
    <div class="title">跟进记录</div>
    <div class="content">
      <el-table
        v-loading="loading"
        ref="multipleTable"
        :data="tabList"
        stripe
        border
        tooltip-effect="dark"
        style="width: 100%"
      >
        <el-table-column label="序号" align="center" type="index" width="64px" />
        <el-table-column label="跟进时间" prop="followTime"></el-table-column>
        <el-table-column label="进展" prop="progress"></el-table-column>
        <el-table-column label="跟进项目" prop="followProject"></el-table-column>
        <el-table-column label="沟通内容" prop="content"></el-table-column>
        <el-table-column label="客户负责人" prop="responsiblePerson"></el-table-column>
        <el-table-column label="提交时间" prop="createTime"></el-table-column>
      </el-table>
      <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
        @pagination="getList"></pagination>
    </div>
      
  </div>
</template>
            
  <script>
import Loading from "@/components/Loading/index";
// api
import {
	followList,
} from "@/api/customer/customerFile";

export default {
  name: "detail",
  components: {},
  data() {
    return {
      tabList: [],
      loading: false,
      total: 0,
       // 查询参数
       queryParams: {
          clientId: '',
          pageNum: 1,
          pageSize: 10,
        },
    };
  },
  computed: {},
  created() {
    this.queryParams.clientId = this.$route.query.id;

    this.getList();
  },
  methods: {
    /** 查询列表 */
    getList() {
      this.loading = true;
      followList(this.queryParams).then(response => {
        response.result.records.forEach(item => {
          for (var key in item) {
            if (item[key] === '') {
              item[key] = "-";
            }
          }
        });
        this.tabList = response.result.records;
        this.total = response.result.total;
        this.loading = false;
      });
    },
  },
};
</script>
  <style lang="scss" scoped>
.followRecord {
  .title {
    height: 30px;
    line-height: 30px;
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 14px;
    margin-top: 20px;
  }
}
</style>
            